/**
 * HW16
 *
 * brief description of the program
 *
 * This program is released to public domain according to
 * author's wish, you can view full license at
 * http://tomatoeskit.org/upload/PublicDomainLicense.txt
 *
 * @author Fangning CHENG (Alpha.L Cheng) <chengf@purdue.edu>
 *
 * @lab section number 
 *
 * @date Oct 1, 2013
 *
 */

public class Zombie {

    String name;
    int serial;
    static int count = 0;
    
    public Zombie(String __name)
    {
        name = __name;
        serial = count;
        ++count;
    }
    
    public static void main(String[] args) {
        // TODO Auto-generated method stub

        printStatus();

        Zombie z1 = new Zombie("Fred");
               
        printStatus();

        Zombie z2 = new Zombie("Ethel");

        printStatus();
                
        Zombie z3 = new Zombie("Lucy");

        printStatus();
                
        z1.printZombie();
        z2.printZombie();
        z3.printZombie();
    }

    void printZombie()
    {
        System.out.println(String.format("%s is zombie %d", name, serial));
    }
    
    static void printStatus()
    {
        System.out.println(String.format("%d zombies created so far", count));
    }
}
